<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/commons/global.jsp" %>
<script type="text/javascript">
    $(function() {
        $('#appServiceAddForm').form({
            url : '${path }/appService/add',
            onSubmit : function() {
                progressLoad();
                var isValid = $(this).form('validate');
                if (!isValid) {
                    progressClose();
                }
                return isValid;
            },
            success : function(result) {
                progressClose();
                result = $.parseJSON(result);
                if (result.success) {
                    parent.$.modalDialog.openner_dataGrid.datagrid('reload');//之所以能在这里调用到parent.$.modalDialog.openner_dataGrid这个对象，是因为user.jsp页面预定义好了
                    parent.$.modalDialog.handler.dialog('close');
                } else {
                    parent.$.messager.alert('错误', result.msg, 'error');
                }
            }
        });
     });

</script>
<div style="padding: 3px;">
    <form id="appServiceAddForm" method="post">
        <table class="grid">
            <tr >
                <td>服务中心名称</td>
                <td colspan="3">
                    <input name="serviceName" type="text" value="" placeholder="请输入服务中心名称" class="easyui-validatebox" data-options="required:true">
                </td>
            </tr>
            <tr>
                <td>联系人员</td>
                <td colspan="3">
                    <input name="pName" type="text" value="" placeholder="请输入联系人" class="easyui-validatebox" data-options="required:true">
                </td>
            </tr>
            <tr>
                <td>联系电话</td>
                <td colspan="3">
                    <input name="pPhone" type="text" value="" placeholder="请输入联系电话" class="easyui-validatebox" data-options="required:true">
                </td>
            </tr>
            <tr>
                <td>状态</td>
                <td >
                    <select  name="status" class="easyui-combobox" data-options="width:100,height:29,editable:false,panelHeight:'auto'">
                        <option value="0">禁用</option>
                        <option value="1">正常</option>
                    </select>
                </td>
            </tr>
        </table>
    </form>
</div>